home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / PInterfaces / Printing.p < prev    next >
Encoding:
Text File  |  1996-05-05  |  13.5 KB  |  507 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Printing.p
  3.  
  4.      Contains:    Print Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.1.3
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. }
  19.  
  20. {$IFC UNDEFINED UsingIncludes}
  21. {$SETC UsingIncludes := 0}
  22. {$ENDC}
  23.  
  24. {$IFC NOT UsingIncludes}
  25.  UNIT Printing;
  26.  INTERFACE
  27. {$ENDC}
  28.  
  29. {$IFC UNDEFINED __PRINTING__}
  30. {$SETC __PRINTING__ := 1}
  31.  
  32. {$I+}
  33. {$SETC PrintingIncludes := UsingIncludes}
  34. {$SETC UsingIncludes := 1}
  35.  
  36.  
  37. {$IFC UNDEFINED __ERRORS__}
  38. {$I Errors.p}
  39. {$ENDC}
  40. {    ConditionalMacros.p                                            }
  41.  
  42. {$IFC UNDEFINED __QUICKDRAW__}
  43. {$I Quickdraw.p}
  44. {$ENDC}
  45. {    Types.p                                                        }
  46. {    MixedMode.p                                                    }
  47. {    QuickdrawText.p                                                }
  48.  
  49. {$IFC UNDEFINED __DIALOGS__}
  50. {$I Dialogs.p}
  51. {$ENDC}
  52. {    Memory.p                                                    }
  53. {    Menus.p                                                        }
  54. {    Controls.p                                                    }
  55. {    Windows.p                                                    }
  56. {        Events.p                                                }
  57. {            OSUtils.p                                            }
  58. {    TextEdit.p                                                    }
  59.  
  60. {$PUSH}
  61. {$ALIGN MAC68K}
  62. {$LibExport+}
  63.  
  64. CONST
  65.     iPFMaxPgs                    = 128;
  66.     iPrPgFract                    = 120;                            {Page scale factor. ptPgSize (below) is in units of 1/iPrPgFract}
  67.     iPrPgFst                    = 1;                            {Page range constants}
  68.     iPrPgMax                    = 9999;
  69.     iPrRelease                    = 3;                            {Current version number of the code.}
  70.     iPrSavPFil                    = -1;
  71.     iPrAbort                    = $0080;
  72.     iPrDevCtl                    = 7;                            {The PrDevCtl Proc's ctl number}
  73.     lPrReset                    = $00010000;                    {The PrDevCtl Proc's CParam for reset}
  74.     lPrLineFeed                    = $00030000;
  75.     lPrLFStd                    = $0003FFFF;                    {The PrDevCtl Proc's CParam for std paper advance}
  76.     lPrLFSixth                    = $0003FFFF;
  77.     lPrPageEnd                    = $00020000;                    {The PrDevCtl Proc's CParam for end page}
  78.     lPrDocOpen                    = $00010000;
  79.     lPrPageOpen                    = $00040000;
  80.     lPrPageClose                = $00020000;
  81.     lPrDocClose                    = $00050000;
  82.     iFMgrCtl                    = 8;                            {The FMgr's Tail-hook Proc's ctl number}
  83.     iMscCtl                        = 9;                            {The FMgr's Tail-hook Proc's ctl number}
  84.     iPvtCtl                        = 10;                            {The FMgr's Tail-hook Proc's ctl number}
  85.  
  86.     pPrGlobals                    = $00000944;                    {The PrVars lo mem area:}
  87.     bDraftLoop                    = 0;
  88.     bSpoolLoop                    = 1;
  89.     bUser1Loop                    = 2;
  90.     bUser2Loop                    = 3;
  91.     fNewRunBit                    = 2;
  92.     fHiResOK                    = 3;
  93.     fWeOpenedRF                    = 4;
  94. {Driver constants }
  95.     iPrBitsCtl                    = 4;
  96.     lScreenBits                    = 0;
  97.     lPaintBits                    = 1;
  98.     lHiScreenBits                = $00000002;                    {The Bitmap Print Proc's Screen Bitmap param}
  99.     lHiPaintBits                = $00000003;                    {The Bitmap Print Proc's Paint [sq pix] param}
  100.     iPrIOCtl                    = 5;
  101.     iPrEvtCtl                    = 6;                            {The PrEvent Proc's ctl number}
  102.     lPrEvtAll                    = $0002FFFD;                    {The PrEvent Proc's CParam for the entire screen}
  103.     lPrEvtTop                    = $0001FFFD;                    {The PrEvent Proc's CParam for the top folder}
  104.     iPrDrvrRef                    = -3;
  105.  
  106.     getRslDataOp                = 4;
  107.     setRslOp                    = 5;
  108.     draftBitsOp                    = 6;
  109.     noDraftBitsOp                = 7;
  110.     getRotnOp                    = 8;
  111.     NoSuchRsl                    = 1;
  112.     OpNotImpl                    = 2;                            {the driver doesn't support this opcode}
  113.     RgType1                        = 1;
  114.  
  115.     feedCut                        = 0;
  116.     feedFanfold                    = 1;
  117.     feedMechCut                    = 2;
  118.     feedOther                    = 3;
  119.  
  120.     
  121. TYPE
  122.     TFeed = SInt8;
  123.  
  124.  
  125. CONST
  126.     scanTB                        = 0;
  127.     scanBT                        = 1;
  128.     scanLR                        = 2;
  129.     scanRL                        = 3;
  130.  
  131.     
  132. TYPE
  133.     TScan = SInt8;
  134.  
  135. { A Rect Ptr }
  136.     TPRect = ^Rect;
  137.  
  138.     PrIdleProcPtr = ProcPtr;  { PROCEDURE PrIdle; }
  139.     PrIdleUPP = UniversalProcPtr;
  140.  
  141. CONST
  142.     uppPrIdleProcInfo = $00000000; { PROCEDURE ; }
  143.  
  144. FUNCTION NewPrIdleProc(userRoutine: PrIdleProcPtr): PrIdleUPP;
  145.     {$IFC NOT GENERATINGCFM }
  146.     INLINE $2E9F;
  147.     {$ENDC}
  148.  
  149. PROCEDURE CallPrIdleProc(userRoutine: PrIdleUPP);
  150.     {$IFC NOT GENERATINGCFM}
  151.     INLINE $205F, $4E90;
  152.     {$ENDC}
  153. TYPE
  154.     PItemProcPtr = ProcPtr;  { PROCEDURE PItem(theDialog: DialogPtr; item: INTEGER); }
  155.     PItemUPP = UniversalProcPtr;
  156.  
  157. CONST
  158.     uppPItemProcInfo = $000002C0; { PROCEDURE (4 byte param, 2 byte param); }
  159.  
  160. FUNCTION NewPItemProc(userRoutine: PItemProcPtr): PItemUPP;
  161.     {$IFC NOT GENERATINGCFM }
  162.     INLINE $2E9F;
  163.     {$ENDC}
  164.  
  165. PROCEDURE CallPItemProc(theDialog: DialogPtr; item: INTEGER; userRoutine: PItemUPP);
  166.     {$IFC NOT GENERATINGCFM}
  167.     INLINE $205F, $4E90;
  168.     {$ENDC}
  169.  
  170. TYPE
  171.     TPrPort = RECORD
  172.         gPort:                    GrafPort;                                {The Printer's graf port.}
  173.         gProcs:                    QDProcs;                                {..and its procs}
  174.         lGParam1:                LONGINT;                                {16 bytes for private parameter storage.}
  175.         lGParam2:                LONGINT;
  176.         lGParam3:                LONGINT;
  177.         lGParam4:                LONGINT;
  178.         fOurPtr:                BOOLEAN;                                {Whether the PrPort allocation was done by us.}
  179.         fOurBits:                BOOLEAN;                                {Whether the BitMap allocation was done by us.}
  180.     END;
  181.  
  182.     TPPrPort = ^TPrPort;
  183.  
  184. { Printing Graf Port. All printer imaging, whether spooling, banding, etc, happens "thru" a GrafPort.
  185.   This is the "PrPeek" record. }
  186.     TPrInfo = RECORD
  187.         iDev:                    INTEGER;                                {Font mgr/QuickDraw device code}
  188.         iVRes:                    INTEGER;                                {Resolution of device, in device coordinates}
  189.         iHRes:                    INTEGER;                                {..note: V before H => compatable with Point.}
  190.         rPage:                    Rect;                                    {The page (printable) rectangle in device coordinates.}
  191.     END;
  192.  
  193.     TPPrInfo = ^TPrInfo;
  194.  
  195. { Print Info Record: The parameters needed for page composition. }
  196.     TPrStl = RECORD
  197.         wDev:                    INTEGER;
  198.         iPageV:                    INTEGER;
  199.         iPageH:                    INTEGER;
  200.         bPort:                    SInt8;
  201.         feed:                    TFeed;
  202.     END;
  203.  
  204.     TPPrStl = ^TPrStl;
  205.  
  206.     TPrXInfo = RECORD
  207.         iRowBytes:                INTEGER;
  208.         iBandV:                    INTEGER;
  209.         iBandH:                    INTEGER;
  210.         iDevBytes:                INTEGER;
  211.         iBands:                    INTEGER;
  212.         bPatScale:                SInt8;
  213.         bUlThick:                SInt8;
  214.         bUlOffset:                SInt8;
  215.         bUlShadow:                SInt8;
  216.         scan:                    TScan;
  217.         bXInfoX:                SInt8;
  218.     END;
  219.  
  220.     TPPrXInfo = ^TPrXInfo;
  221.  
  222.     TPrJob = RECORD
  223.         iFstPage:                INTEGER;                                {Page Range.}
  224.         iLstPage:                INTEGER;
  225.         iCopies:                INTEGER;                                {No. copies.}
  226.         bJDocLoop:                SInt8;                                    {The Doc style: Draft, Spool, .., and ..}
  227.         fFromUsr:                BOOLEAN;                                {Printing from an User's App (not PrApp) flag}
  228.         pIdleProc:                PrIdleUPP;                                {The Proc called while waiting on IO etc.}
  229.         pFileName:                StringPtr;                                {Spool File Name: NIL for default.}
  230.         iFileVol:                INTEGER;                                {Spool File vol, set to 0 initially}
  231.         bFileVers:                SInt8;                                    {Spool File version, set to 0 initially}
  232.         bJobX:                    SInt8;                                    {An eXtra byte.}
  233.     END;
  234.  
  235.     TPPrJob = ^TPrJob;
  236.  
  237. { Print Job: Print "form" for a single print request. }
  238.     TPrFlag1 = PACKED RECORD
  239.         f15:                    BOOLEAN;
  240.         f14:                    BOOLEAN;
  241.         f13:                    BOOLEAN;
  242.         f12:                    BOOLEAN;
  243.         f11:                    BOOLEAN;
  244.         f10:                    BOOLEAN;
  245.         f9:                        BOOLEAN;
  246.         f8:                        BOOLEAN;
  247.         f7:                        BOOLEAN;
  248.         f6:                        BOOLEAN;
  249.         f5:                        BOOLEAN;
  250.         f4:                        BOOLEAN;
  251.         f3:                        BOOLEAN;
  252.         f2:                        BOOLEAN;
  253.         fLstPgFst:                BOOLEAN;
  254.         fUserScale:                BOOLEAN;
  255.     END;
  256.  
  257.     TPrint = RECORD
  258.         iPrVersion:                INTEGER;                                {(2) Printing software version}
  259.         prInfo:                    TPrInfo;                                {(14) the PrInfo data associated with the current style.}
  260.         rPaper:                    Rect;                                    {(8) The paper rectangle [offset from rPage]}
  261.         prStl:                    TPrStl;                                    {(8)  This print request's style.}
  262.         prInfoPT:                TPrInfo;                                {(14)  Print Time Imaging metrics}
  263.         prXInfo:                TPrXInfo;                                {(16)  Print-time (expanded) Print info record.}
  264.         prJob:                    TPrJob;                                    {(20) The Print Job request (82)  Total of the above; 120-82 = 38 bytes needed to fill 120}
  265.         CASE INTEGER OF
  266.         0: (
  267.             printX:                        ARRAY [1..19] OF INTEGER;
  268.            );
  269.         1: (
  270.             prFlag1:                    TPrFlag1;
  271.             iZoomMin:                    INTEGER;
  272.             iZoomMax:                    INTEGER;
  273.             hDocName:                    StringHandle;
  274.            );
  275.     END;
  276.  
  277.     TPPrint = ^TPrint;
  278.     THPrint = ^TPPrint;
  279.  
  280. { The universal 120 byte printing record }
  281.     TPrStatus = RECORD
  282.         iTotPages:                INTEGER;                                {Total pages in Print File.}
  283.         iCurPage:                INTEGER;                                {Current page number}
  284.         iTotCopies:                INTEGER;                                {Total copies requested}
  285.         iCurCopy:                INTEGER;                                {Current copy number}
  286.         iTotBands:                INTEGER;                                {Total bands per page.}
  287.         iCurBand:                INTEGER;                                {Current band number}
  288.         fPgDirty:                BOOLEAN;                                {True if current page has been written to.}
  289.         fImaging:                BOOLEAN;                                {Set while in band's DrawPic call.}
  290.         hPrint:                    THPrint;                                {Handle to the active Printer record}
  291.         pPrPort:                TPPrPort;                                {Ptr to the active PrPort}
  292.         hPic:                    PicHandle;                                {Handle to the active Picture}
  293.     END;
  294.  
  295.     TPPrStatus = ^TPrStatus;
  296.  
  297. { Print Status: Print information during printing. }
  298.     TPfPgDir = RECORD
  299.         iPages:                    INTEGER;
  300.         iPgPos:                    ARRAY [0..128] OF LONGINT;                {ARRAY [0..iPfMaxPgs] OF LONGINT}
  301.     END;
  302.  
  303.     TPPfPgDir = ^TPfPgDir;
  304.     THPfPgDir = ^TPPfPgDir;
  305.  
  306. { PicFile = a TPfHeader followed by n QuickDraw Pics (whose PicSize is invalid!) }
  307. { This is the Printing Dialog Record. Only used by folks appending their own
  308.    DITLs to the print dialogs.    Print Dialog: The Dialog Stream object. }
  309.     TPrDlg = RECORD
  310.         Dlg:                    DialogRecord;                            {The Dialog window}
  311.         pFltrProc:                ModalFilterUPP;                            {The Filter Proc.}
  312.         pItemProc:                PItemUPP;                                {The Item evaluating proc.}
  313.         hPrintUsr:                THPrint;                                {The user's print record.}
  314.         fDoIt:                    BOOLEAN;
  315.         fDone:                    BOOLEAN;
  316.         lUser1:                    LONGINT;                                {Four longs for apps to hang global data.}
  317.         lUser2:                    LONGINT;                                {Plus more stuff needed by the particular}
  318.         lUser3:                    LONGINT;                                {printing dialog.}
  319.         lUser4:                    LONGINT;
  320.     END;
  321.  
  322.     TPPrDlg = ^TPrDlg;
  323.  
  324.     TPPrDlgRef = ^TPrDlg;
  325.  
  326.     PDlgInitProcPtr = ProcPtr;  { FUNCTION PDlgInit(hPrint: THPrint): TPPrDlgRef; }
  327.     PDlgInitUPP = UniversalProcPtr;
  328.  
  329. CONST
  330.     uppPDlgInitProcInfo = $000000F0; { FUNCTION (4 byte param): 4 byte result; }
  331.  
  332. FUNCTION NewPDlgInitProc(userRoutine: PDlgInitProcPtr): PDlgInitUPP;
  333.     {$IFC NOT GENERATINGCFM }
  334.     INLINE $2E9F;
  335.     {$ENDC}
  336.  
  337. FUNCTION CallPDlgInitProc(hPrint: THPrint; userRoutine: PDlgInitUPP): TPPrDlgRef;
  338.     {$IFC NOT GENERATINGCFM}
  339.     INLINE $205F, $4E90;
  340.     {$ENDC}
  341.  
  342. TYPE
  343.     TGnlData = RECORD
  344.         iOpCode:                INTEGER;
  345.         iError:                    INTEGER;
  346.         lReserved:                LONGINT;                                {more fields here depending on call}
  347.     END;
  348.  
  349.     TRslRg = RECORD
  350.         iMin:                    INTEGER;
  351.         iMax:                    INTEGER;
  352.     END;
  353.  
  354.     TRslRec = RECORD
  355.         iXRsl:                    INTEGER;
  356.         iYRsl:                    INTEGER;
  357.     END;
  358.  
  359.     TGetRslBlk = RECORD
  360.         iOpCode:                INTEGER;
  361.         iError:                    INTEGER;
  362.         lReserved:                LONGINT;
  363.         iRgType:                INTEGER;
  364.         xRslRg:                    TRslRg;
  365.         yRslRg:                    TRslRg;
  366.         iRslRecCnt:                INTEGER;
  367.         rgRslRec:                ARRAY [1..27] OF TRslRec;
  368.     END;
  369.  
  370.     TSetRslBlk = RECORD
  371.         iOpCode:                INTEGER;
  372.         iError:                    INTEGER;
  373.         lReserved:                LONGINT;
  374.         hPrint:                    THPrint;
  375.         iXRsl:                    INTEGER;
  376.         iYRsl:                    INTEGER;
  377.     END;
  378.  
  379.     TDftBitsBlk = RECORD
  380.         iOpCode:                INTEGER;
  381.         iError:                    INTEGER;
  382.         lReserved:                LONGINT;
  383.         hPrint:                    THPrint;
  384.     END;
  385.  
  386.     TGetRotnBlk = RECORD
  387.         iOpCode:                INTEGER;
  388.         iError:                    INTEGER;
  389.         lReserved:                LONGINT;
  390.         hPrint:                    THPrint;
  391.         fLandscape:                BOOLEAN;
  392.         bXtra:                    SInt8;
  393.     END;
  394.  
  395.  
  396. PROCEDURE PrPurge;
  397.     {$IFC NOT GENERATINGCFM}
  398.     INLINE $2F3C, $A800, $0000, $A8FD;
  399.     {$ENDC}
  400. PROCEDURE PrNoPurge;
  401.     {$IFC NOT GENERATINGCFM}
  402.     INLINE $2F3C, $B000, $0000, $A8FD;
  403.     {$ENDC}
  404. PROCEDURE PrOpen;
  405.     {$IFC NOT GENERATINGCFM}
  406.     INLINE $2F3C, $C800, $0000, $A8FD;
  407.     {$ENDC}
  408. PROCEDURE PrClose;
  409.     {$IFC NOT GENERATINGCFM}
  410.     INLINE $2F3C, $D000, $0000, $A8FD;
  411.     {$ENDC}
  412. PROCEDURE PrintDefault(hPrint: THPrint);
  413.     {$IFC NOT GENERATINGCFM}
  414.     INLINE $2F3C, $2004, $0480, $A8FD;
  415.     {$ENDC}
  416. FUNCTION PrValidate(hPrint: THPrint): BOOLEAN;
  417.     {$IFC NOT GENERATINGCFM}
  418.     INLINE $2F3C, $5204, $0498, $A8FD;
  419.     {$ENDC}
  420. FUNCTION PrStlDialog(hPrint: THPrint): BOOLEAN;
  421.     {$IFC NOT GENERATINGCFM}
  422.     INLINE $2F3C, $2A04, $0484, $A8FD;
  423.     {$ENDC}
  424. FUNCTION PrJobDialog(hPrint: THPrint): BOOLEAN;
  425.     {$IFC NOT GENERATINGCFM}
  426.     INLINE $2F3C, $3204, $0488, $A8FD;
  427.     {$ENDC}
  428. FUNCTION PrStlInit(hPrint: THPrint): TPPrDlgRef;
  429.     {$IFC NOT GENERATINGCFM}
  430.     INLINE $2F3C, $3C04, $040C, $A8FD;
  431.     {$ENDC}
  432. FUNCTION PrJobInit(hPrint: THPrint): TPPrDlgRef;
  433.     {$IFC NOT GENERATINGCFM}
  434.     INLINE $2F3C, $4404, $0410, $A8FD;
  435.     {$ENDC}
  436. PROCEDURE PrJobMerge(hPrintSrc: THPrint; hPrintDst: THPrint);
  437.     {$IFC NOT GENERATINGCFM}
  438.     INLINE $2F3C, $5804, $089C, $A8FD;
  439.     {$ENDC}
  440. FUNCTION PrDlgMain(hPrint: THPrint; pDlgInit: PDlgInitUPP): BOOLEAN;
  441.     {$IFC NOT GENERATINGCFM}
  442.     INLINE $2F3C, $4A04, $0894, $A8FD;
  443.     {$ENDC}
  444. FUNCTION PrOpenDoc(hPrint: THPrint; pPrPort: TPPrPort; pIOBuf: Ptr): TPPrPort;
  445.     {$IFC NOT GENERATINGCFM}
  446.     INLINE $2F3C, $0400, $0C00, $A8FD;
  447.     {$ENDC}
  448. PROCEDURE PrCloseDoc(pPrPort: TPPrPort);
  449.     {$IFC NOT GENERATINGCFM}
  450.     INLINE $2F3C, $0800, $0484, $A8FD;
  451.     {$ENDC}
  452. PROCEDURE PrOpenPage(pPrPort: TPPrPort; pPageFrame: TPRect);
  453.     {$IFC NOT GENERATINGCFM}
  454.     INLINE $2F3C, $1000, $0808, $A8FD;
  455.     {$ENDC}
  456. PROCEDURE PrClosePage(pPrPort: TPPrPort);
  457.     {$IFC NOT GENERATINGCFM}
  458.     INLINE $2F3C, $1800, $040C, $A8FD;
  459.     {$ENDC}
  460. PROCEDURE PrPicFile(hPrint: THPrint; pPrPort: TPPrPort; pIOBuf: Ptr; pDevBuf: Ptr; VAR prStatus: TPrStatus);
  461.     {$IFC NOT GENERATINGCFM}
  462.     INLINE $2F3C, $6005, $1480, $A8FD;
  463.     {$ENDC}
  464. FUNCTION PrError: INTEGER;
  465.     {$IFC NOT GENERATINGCFM}
  466.     INLINE $2F3C, $BA00, $0000, $A8FD;
  467.     {$ENDC}
  468. PROCEDURE PrSetError(iErr: INTEGER);
  469.     {$IFC NOT GENERATINGCFM}
  470.     INLINE $2F3C, $C000, $0200, $A8FD;
  471.     {$ENDC}
  472. PROCEDURE PrGeneral(pData: Ptr);
  473.     {$IFC NOT GENERATINGCFM}
  474.     INLINE $2F3C, $7007, $0480, $A8FD;
  475.     {$ENDC}
  476. PROCEDURE PrDrvrOpen;
  477.     {$IFC NOT GENERATINGCFM}
  478.     INLINE $2F3C, $8000, $0000, $A8FD;
  479.     {$ENDC}
  480. PROCEDURE PrDrvrClose;
  481.     {$IFC NOT GENERATINGCFM}
  482.     INLINE $2F3C, $8800, $0000, $A8FD;
  483.     {$ENDC}
  484. PROCEDURE PrCtlCall(iWhichCtl: INTEGER; lParam1: LONGINT; lParam2: LONGINT; lParam3: LONGINT);
  485.     {$IFC NOT GENERATINGCFM}
  486.     INLINE $2F3C, $A000, $0E00, $A8FD;
  487.     {$ENDC}
  488. FUNCTION PrDrvrDCE: Handle;
  489.     {$IFC NOT GENERATINGCFM}
  490.     INLINE $2F3C, $9400, $0000, $A8FD;
  491.     {$ENDC}
  492. FUNCTION PrDrvrVers: INTEGER;
  493.     {$IFC NOT GENERATINGCFM}
  494.     INLINE $2F3C, $9A00, $0000, $A8FD;
  495.     {$ENDC}
  496.  
  497. {$ALIGN RESET}
  498. {$POP}
  499.  
  500. {$SETC UsingIncludes := PrintingIncludes}
  501.  
  502. {$ENDC} {__PRINTING__}
  503.  
  504. {$IFC NOT UsingIncludes}
  505.  END.
  506. {$ENDC}
  507.